<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
</body>
<script>
    var str ="abc";
    for (var item of str){
        console.log(item);
    }

    var liNodes = document.querySelectorAll("li");
    for (var item of liNodes){
        console.log(item);
    }
</script>
</html>